﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataAccessor.Protector
{
    public interface IProtector
    {
        /// <summary>
        /// 解密连接字符串
        /// </summary>
        /// <param name="connectionString">加密过的连接字符串</param>
        /// <returns>解密后的连接字符串</returns>
        string DecryptConnectionString(string connectionString);

        /// <summary>
        /// 解密T-SQL配置文件
        /// </summary>
        /// <param name="encryptedFile">加密文件地址</param>
        /// <param name="decryptedFile">解密后的文件地址</param>
        void DecryptTSQLFile(string encryptedFile, string decryptedFile);

        /// <summary>
        /// 加密连接字符串
        /// </summary>
        /// <param name="connectionString">连接字符串</param>
        /// <returns>加密后的连接字符串</returns>
        string EncryptConnectionString(string connectionString);

        /// <summary>
        /// 加密T-SQL配置文件
        /// </summary>
        /// <param name="sourceFile">源文件地址</param>
        /// <param name="encryptedFile">加密后的文件地址</param>
        void EncryptTSQLFile(string sourceFile, string encryptedFile);
    }
}
